package com.solution.model;

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * UserQuestionMapping
 */
@Entity
@Table(name="User_Question_Mapping"
    ,schema="public"
)
public class UserQuestionMapping extends AbstractPO
 {

	
	private static final long serialVersionUID = 1L;
	
    private UserQuestionMappingId id;
    private QuestionType questionType;
    private AnswerType answerType;
    private UserInfo userInfo;
    private String createdBy;
    private Date createdOn;
    private String modifiedBy;
    private Date modifiedOn;
    private String rfu1;
    private String rfu2;
    private String rfu3;

     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="userInfoId", column=@Column(name="User_InfoID", nullable=false, precision=10, scale=0) ), 
        @AttributeOverride(name="questionTypeId", column=@Column(name="Question_TypeID", nullable=false, precision=10, scale=0) ),
        @AttributeOverride(name="markedAnswerTypeId", column=@Column(name="Marked_Answer_TypeID", nullable=false, precision=10, scale=0) ) } )
    public UserQuestionMappingId getId() {
        return this.id;
    }
    
    public void setId(UserQuestionMappingId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Question_TypeID", nullable=false, insertable=false, updatable=false)
    public QuestionType getQuestionType() {
        return this.questionType;
    }
    
    public void setQuestionType(QuestionType questionType) {
        this.questionType = questionType;
    }
@ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Marked_Answer_TypeID" , insertable=false, updatable=false)
    public AnswerType getAnswerType() {
        return this.answerType;
    }
    
    public void setAnswerType(AnswerType answerType) {
        this.answerType = answerType;
    }
@ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="User_InfoID", nullable=false, insertable=false, updatable=false)
    public UserInfo getUserInfo() {
        return this.userInfo;
    }
    
    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }
    
    @Column(name="CreatedBy", nullable=false, length=50)
    public String getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }
    
    @Column(name="CreatedOn", nullable=false, length=23)
    public Date getCreatedOn() {
        return this.createdOn;
    }
    
    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }
    
    @Column(name="ModifiedBy", length=50)
    public String getModifiedBy() {
        return this.modifiedBy;
    }
    
    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy;
    }
    
    @Column(name="ModifiedOn", length=23)
    public Date getModifiedOn() {
        return this.modifiedOn;
    }
    
    public void setModifiedOn(Date modifiedOn) {
        this.modifiedOn = modifiedOn;
    }
    
    @Column(name="RFU1", length=100)
    public String getRfu1() {
        return this.rfu1;
    }
    
    public void setRfu1(String rfu1) {
        this.rfu1 = rfu1;
    }
    
    @Column(name="RFU2", length=100)
    public String getRfu2() {
        return this.rfu2;
    }
    
    public void setRfu2(String rfu2) {
        this.rfu2 = rfu2;
    }
    
    @Column(name="RFU3", length=100)
    public String getRfu3() {
        return this.rfu3;
    }
    
    public void setRfu3(String rfu3) {
        this.rfu3 = rfu3;
    }




}


